﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2013/3/23 星期六 17:37:19
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Sector7.Framework.DB;

namespace Sector7.Framework.DAO.Standard
{
    /// <summary>
    /// 数据库操作数据访问对象
    /// </summary>
    public class DatabaseDAO : IDatabaseDAO
    {
        #region Public functions
        public int CreateTable(string sql)
        {
            using (DBHelper helper = new DBHelper())
            {
                return helper.ExecuteNonQuery(sql);
            }
        }

        public int CreateTable(string connectionString, string sql)
        {
            using (DBHelper helper = new DBHelper(connectionString))
            {
                return helper.ExecuteNonQuery(sql);
            }
        }
        #endregion
    }
}
